package com.suning.generator.util;

/**
 * 字符串工具类
 *
 * @author bail
 * @date 2020/4/26
 */
public class StringUtils extends org.apache.commons.lang3.StringUtils {

    /**
     * 首字母大写
     *
     * @param string
     * @return
     */
    public static String toUpperFirstChar(String string) {
        if (Character.isUpperCase(string.charAt(0))) {
            return string;
        } else {
            char[] charArray = string.toCharArray();
            charArray[0] -= 32;
            return String.valueOf(charArray);
        }
    }
}
